package com.zx.util;

import java.sql.*;

public class JDBCUtil {
    private static String url = "jdbc:mysql://localhost:3306/sudent";
    private static String username = "root";
    private static String password = "root";

    static{
        try {
            Class.forName("com.mysql.jdbc.Driver");

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(url,username,password);
    }

}
